using System.IO;
using Lucene.Net.Analysis;

namespace SpellCenter.Core
{
    sealed internal class SfmAnalyzer : Analyzer
    {
        private SpellWordTokenizer _tokenizer = new SpellWordTokenizer(null);

        public override TokenStream TokenStream(string fieldName, TextReader reader)
        {
            _tokenizer = new SpellWordTokenizer(reader);
            return _tokenizer;
        }

        public long StartOfCurrentToken
        {
            get { return _tokenizer.StartOfCurrentToken; }
        }
    }
}
